<?php
/**
 * Manageaccount_Data_Deleteuseraccount
 * delete user account
 * 
 * @author Adrian Stolarski
 */
class Manageaccount_Data_Deleteuseraccount implements Manageaccount_Data_Mainable{
    
    /**
     *
     * @var type $delete_user_object
     * delete user object handler
     */
    public $delete_user_object;
    /**
     *
     * @var type $delete_user_data
     * delete user data handler
     */
    public $delete_user_data;
    /**
     *
     * @var type redirect_action
     * redirect action handler
     */
    public $redirect_action;
    
    /**
     * constructor()
     */
    public function __construct() {
        $this->delete_user_object = new Manageaccount_Data_Deleteuserobject;
        $this->delete_user_data = new Manageaccount_Data_Deleteuserdata;
        $this->redirect_action = new Login_Data_Loginredirect;
    }
    
    /**
     * main()
     * delete user account
     */
    public function main(array $variables = null) {
        //var_dump($variables);
        $this->delete_user_object->main($variables);
        $this->delete_user_data->main($variables);
        session_destroy();
        $this->redirect_action->main($variables);
    }

}
